<template>
	<view class="uv-content">
		<uv-parse :content="content"></uv-parse>
	</view>
</template>

<script setup>
	import { onLoad } from "@dcloudio/uni-app";
	import { ref } from "vue";
	import { useUserStore } from '@/store/modules/user.js'
	const userstore = useUserStore()
	const content = ref('')
	onLoad(async (option) => {
		uni.setNavigationBarTitle({
			title: option.title
		});
		if (option.title == '用户协议') {
			let res = await userstore.getConFig({ type: 'accord' })
			content.value = res.data.content
		} else if(option.title == '隐私政策'){
			let res = await userstore.getConFig({ type: 'policy' })
			content.value = res.data.content
		} else if(option.title == '城伴星光服务协议'){
			let res = await userstore.getConFig({ type: 'chargeTips' })
			content.value = res.data.content
		}else{
			let res = await userstore.getConFig({ type: 'jointTips' })
			content.value = res.data.content
		}

	})
</script>

<style lang="scss" scoped>
	.uv-content {
		padding: 30rpx;
	}
</style>